{ //=========Macro generated from canvas: c1/Efficiencies //========= (Sat Mar 28 21:21:15 2009) by ROOT version5.22/00 TCanvas *c1 = new TCanvas("c1", "Efficiencies",0,44,600,600); gStyle->SetOptStat(0); gStyle->SetOptTitle(0); c1->Range(-1.375,-13.75,2.375,123.75); c1->SetFillColor(0); c1->SetBorderMode(0); c1->SetBorderSize(2); c1->SetFrameBorderMode(0); c1->SetFrameBorderMode(0); TGraphAsymmErrors *grae = new TGraphAsymmErrors(15); grae->SetName(""); grae->SetTitle(""); grae->SetFillColor(1); grae->SetLineWidth(2); grae->SetMarkerStyle(20); grae->SetMarkerSize(1.0); grae->SetMarkerColor(2); grae->SetLineColor(2); grae->SetPoint(0,-0.9,0.3904338); grae->SetPointError(0,0.1,0.1,0.009369374,0.009423574); grae->SetPoint(1,-0.7,0.5293496); grae->SetPointError(1,0.1,0.1,0.006633495,0.00662659); grae->SetPoint(2,-0.5,0.7250191); grae->SetPointError(2,0.1,0.1,0.004684993,0.004652192); grae->SetPoint(3,-0.3,0.912191); grae->SetPointError(3,0.1,0.1,0.002638264,0.002591355); grae->SetPoint(4,-0.1,0.9715991); grae->SetPointError(4,0.1,0.1,0.001432373,0.001387092); grae->SetPoint(5,0.1,0.9932367); grae->SetPointError(5,0.1,0.1,0.0006800919,0.0006376203); grae->SetPoint(6,0.3,0.9971508); grae->SetPointError(6,0.1,0.1,0.0004413619,0.0004001182); grae->SetPoint(7,0.5,0.9974295); grae->SetPointError(7,0.1,0.1,0.0004286883,0.0003858515); grae->SetPoint(8,0.7,0.99801); grae->SetPointError(8,0.1,0.1,0.0004173678,0.0003661824); grae->SetPoint(9,0.9,0.9987201); grae->SetPointError(9,0.1,0.1,0.0003911494,0.0003248249); grae->SetPoint(10,1.1,0.9981099); grae->SetPointError(10,0.1,0.1,0.0005773642,0.0004795526); grae->SetPoint(11,1.3,0.9982283); grae->SetPointError(11,0.1,0.1,0.0007659883,0.0005939783); grae->SetPoint(12,1.5,0.9966887); grae->SetPointError(12,0.1,0.1,0.001562238,0.001187224); grae->SetPoint(13,1.7,0.998325); grae->SetPointError(13,0.1,0.1,0.002505355,0.001224774); grae->SetPoint(14,1.9,0.9913793); grae->SetPointError(14,0.1,0.1,0.01267548,0.006273374); TH1 *Graph11 = new TH1F("Graph11","",100,-1.,2.); Graph11->SetMinimum(0.35); Graph11->SetMaximum(1.05); Graph11->SetDirectory(0); Graph11->SetStats(0); Graph11->SetLineWidth(2); Graph11->SetMarkerStyle(20); Graph11->SetMarkerColor(2); Graph11->SetLineColor(2); Graph11->SetMarkerSize(0.7); Graph11->GetXaxis()->SetNdivisions(506); Graph11->GetXaxis()->SetLabelFont(42); Graph11->GetXaxis()->SetLabelOffset(0.015); Graph11->GetXaxis()->SetTitleSize(0.07); Graph11->GetXaxis()->SetTitleFont(42); Graph11->GetYaxis()->SetNdivisions(506); Graph11->GetYaxis()->SetLabelFont(42); Graph11->GetYaxis()->SetLabelOffset(0.015); Graph11->GetYaxis()->SetTitleSize(0.07); Graph11->GetYaxis()->SetTitleOffset(1.1); Graph11->GetYaxis()->SetTitleFont(42); Graph11->GetZaxis()->SetLabelFont(42); Graph11->GetZaxis()->SetLabelOffset(0.015); Graph11->GetZaxis()->SetTitleSize(0.07); Graph11->GetZaxis()->SetTitleOffset(1.1); Graph11->GetZaxis()->SetTitleFont(42); Graph11->GetXaxis()->SetTitle("log_{10}p(GeV)"); Graph11->GetYaxis()->SetTitle("Efficiency"); Graph11->Draw("p"); grae->SetHistogram(Graph11); grae->Draw("p"); TLegend *leg = new TLegend(0.35,0.25,0.85,0.4,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextFont(42); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); TLegendEntry *entry=leg->AddEntry("effyP","TPC + Si detectors","p"); entry->SetLineColor(2); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(2); entry->SetMarkerStyle(20); entry->SetMarkerSize(1.3); // entry=leg->AddEntry("effyPTPC","TPC only","p"); // entry->SetLineColor(4); // entry->SetLineStyle(1); // entry->SetLineWidth(1); // entry->SetMarkerColor(4); // entry->SetMarkerStyle(21); // entry->SetMarkerSize(1.3); float x[2] = {-1,2}; float y[2] = {1,1}; TPolyLine* line = new TPolyLine(2,x,y); line->SetLineWidth(1); line->SetLineStyle(3); line->Draw(); leg->Draw(); c1->Modified(); c1->cd(); c1->SetSelected(c1); c1->SaveAs("FullTrackPerformance_Effy_P.eps" ); c1->SaveAs("FullTrackPerformance_Effy_P.gif" ); }